package com.observer;

import com.observer.impl.ConcreteObserver;
import com.observer.impl.ConcreteSubject;

public class Test {

	public static void main(String[] args) {
		ConcreteSubject s = new ConcreteSubject();
		s.registerObserver(new ConcreteObserver(s, "张三"));
		s.registerObserver(new ConcreteObserver(s, "李四"));

		s.setContent("今天气温5度");
		s.notifyObservers();
	}

}
